package cn.wolfcode.qo;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@Data
public class NoticeQueryObject extends QueryObject{
//    根据id查询
    private Long id;
//    判断发布公告
    private Integer st;
//    创建日期
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date endTime;
//    公告等级
    private Integer lev;
//    阅读状态
    private Long alreadyRead;

//    获取阅读状态
    public boolean getalRead(){
        if (this.alreadyRead!=null && this.alreadyRead==1 ){
            return true;
        }
        return false;
    }

}
